-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix duplicate testing when unique suite name #114
Conversation
6e6b694
to
1ac5843
Compare
puts 'config inspec tests', config[:inspec_tests] | ||
# if check for duplicates returns true, only send back the value for config[:inspec_tests] | ||
return config[:inspec_tests] if check_for_duplicates(local_suite_files, config[:inspec_tests]) | ||
|
||
# get local tests and get run list of profiles | ||
(local_suite_files + config[:inspec_tests]).compact |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should simply use (local_suite_files + config[:inspec_tests]).compact.uniq
? We also need to double-check that this works with the new complex objects
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
local suite files comes in with the full path:
** local suite files
/Users/vjeffrey/test-kitchen-inspec/test/recipes/master
## config[:inspec_tests]
{:path=>"test/recipes/master"}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, shoot, the complex objects isn't working well. darnit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, maybe we do the following:
1.) we rewrite local suite files to return a complex object like
{:path=>"/Users/vjeffrey/test-kitchen-inspec/test/recipes/master"}
2.) We also resolve the inspec_tests
to absolute paths before we hand them over to inspec
3.) Extend your check_for_duplicates
to only work with objects?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
e16c318
to
f8b2fcb
Compare
k, so as part of this change, since we are harmonizing profile targets, there's an error that is raised if the inspec tests that are specified are not specified in the defined format (like |
f8b2fcb
to
a30217f
Compare
@Vj I think we stay backwards compatible for now (easier upgrade for users), but we do duplicate checking only for the new syntax. |
Signed-off-by: Victoria Jeffrey <vjeffrey@chef.io>
c065aee
to
073f2ad
Compare
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
073f2ad
to
828ac2c
Compare
Signed-off-by: Victoria Jeffrey <vjeffrey@chef.io>
Nice work @vjeffrey |
fixes #109
trying to work on a test for this....